16. Quiz: Assess (Programmatic)
Assess: Programmatic
Example
Assess: Programmatic
Note : At the end of the above video, the assessment that was written down mistakenly included a verb: " Fix nondescriptive column headers." Assessments should actually not include verbs and instead should only be observations of issues with the data, i.e., "Nondescriptive column headers." Verbs come into play when defining cleaning operations.
Explore Common Programmatic Assessments
Now it's time to explore programmatic assessments for yourself! Again, this is where we use code to help detect problems in our data that aren’t as easily detectable with the human eye.
The data wrangling template is displayed in the Jupyter Notebook below with empty cells for four common programmatic assessment methods in pandas (documention pages linked below):
Execute these assessment as per the instructions in those cells. In the following quizzes, you'll be asked to replicate these statements.
For these quizzes and all quizzes going forward, don’t go into them just trying to get them right. Exploring is a key part of learning. Get the code right, then I encourage you to explore the documentation, try various parameters, try new things and see where things break. Error messages are your friend, because you can learn from them.
Workspace
This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity , so you may be able to download them there.
Workspace Information:
- Default file path:
- Workspace type: jupyter
- Opened files (when workspace is loaded): n/a
Quizzes
Quiz: Programmatic (
.head
)
QUESTION:
Get your code, using pandas'
head
function, to work in the Jupyter Notebook workspace above, then provide that one line of code in the space below. Your code should display the first five rows of the DataFrame only.
SOLUTION:
NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer
Quiz: Programmatic (
.tail
)
QUESTION:
Get your code, using pandas'
tail
function, to work in the Jupyter Notebook workspace above, then provide that one line of code below. Your code should display the last five rows of the DataFrame only.
SOLUTION:
NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer
Quiz: Programmatic (
.info
)
QUESTION:
Get your code, using pandas'
info
function, to work in the Jupyter Notebook workspace above, then provide that one line of code below.
SOLUTION:
NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer
Quiz: Programmatic (
.value_counts
)
QUESTION:
Get your code, using pandas'
value_counts
function (with no parameters) applied to the ' Year' column, to work in the Jupyter Notebook workspace above, then provide that one line of code below.
SOLUTION:
NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer